package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.PersonSignatureExample.E_CONTRACT_ID;
import static org.jsola.contract.example.PersonSignatureExample.E_SEAL;
import static org.jsola.contract.example.PersonSignatureExample.E_USER_ID;
import static org.jsola.contract.example.PersonSignatureExample.M_CONTRACT_ID_NOT_NULL;
import static org.jsola.contract.example.PersonSignatureExample.M_SEAL_MAX;
import static org.jsola.contract.example.PersonSignatureExample.M_USER_ID_MAX;
import static org.jsola.contract.example.PersonSignatureExample.N_CONTRACT_ID;
import static org.jsola.contract.example.PersonSignatureExample.N_SEAL;
import static org.jsola.contract.example.PersonSignatureExample.N_USER_ID;
import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;

/**
 * 合同个人签名表
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【合同个人签名表】的参数")
@Data
public class PersonSignatureUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_CONTRACT_ID, example = E_CONTRACT_ID, required = true)
    @NotNull(message = M_CONTRACT_ID_NOT_NULL)
    private Long contractId;

    @ApiModelProperty(notes = N_SEAL, example = E_SEAL)
    @Length(max = 2147483647, message = M_SEAL_MAX)
    private String seal;

    @ApiModelProperty(notes = N_USER_ID, example = E_USER_ID)
    @Length(max = 32, message = M_USER_ID_MAX)
    private String userId;


}

